package com.seres.data;

import java.util.ArrayList;
import java.util.List;

public class CoreModule extends SAModule{
	private boolean evaluationOfRiskIndexIndicator;
	private boolean evaluationOfAllSHIndicator;
	private List<Stakeholder> stakeholdersToEvaluate;
	
	CoreModule(){
		
	}
	public CoreModule(boolean evaluationOfRiskIndexIndicator, boolean evaluationOfAllSHIndicator, List<Stakeholder> stakeholdersToEvaluate, Scenario firstScenario, String title){
		super(firstScenario,title);
		setEvaluationOfRiskIndexIndicator(evaluationOfRiskIndexIndicator);
		setEvaluationOfAllSHIndicator(evaluationOfAllSHIndicator);
		setStakeholdersToEvaluate(stakeholdersToEvaluate);
		setModuleType(ModuleType.CORE);
	}

	@Override
	public boolean isOfType(ModuleType moduleType) {
		return moduleType == ModuleType.CORE;
	}

	public List<Stakeholder> getStakeholdersToEvaluate() {
//		if(isEvaluationOfAllSHIndicator()){
//			List<Stakeholder> stakeholders = new ArrayList<Stakeholder>();
//			for(int i = 0; i < Stakeholder.values().length; i++){
//				stakeholders.add(Stakeholder.values()[i]);
//			}
//			return stakeholders;
//		}
//		else{
			return stakeholdersToEvaluate;
//		}
	}

	public void setStakeholdersToEvaluate(List<Stakeholder> stakeholdersToEvaluate) {
		this.stakeholdersToEvaluate = stakeholdersToEvaluate;
	}

	public boolean isEvaluationOfRiskIndexIndicator() {
		return evaluationOfRiskIndexIndicator;
	}

	public void setEvaluationOfRiskIndexIndicator(
			boolean evaluationOfRiskIndexIndicator) {
		this.evaluationOfRiskIndexIndicator = evaluationOfRiskIndexIndicator;
	}

	public boolean isEvaluationOfAllSHIndicator() {
		return evaluationOfAllSHIndicator;
	}

	public void setEvaluationOfAllSHIndicator(boolean evaluationOfAllSHIndicator) {
		this.evaluationOfAllSHIndicator = evaluationOfAllSHIndicator;
	}
	
}
